import request from "@/utils/request";

const api_name = "/api/hosp/hospital";

export default {
  //查询医院分页数据
  getPageList(page, limit, searchObj) {
    return request({
      url: `${api_name}/findPage/${page}/${limit}`,
      method: "get",
      params: searchObj
    });
  },
  //根据医院名称关键字进行医院数据的模糊查询
  getByHosname(hosname) {
    return request({
      url: `${api_name}/findByHosname/${hosname}`,
      method: "get"
    });
  },
  //查询医院详情数据
  show(hoscode) {
    return request({
      url: `${api_name}/findHospDetail/${hoscode}`,
      method: "get"
    });
  },
  //根据医院编码查询科室数据
  findDepartment(hoscode) {
    return request({
      url: `${api_name}/findDepart/${hoscode}`,
      method: "get"
    });
  },
  //查询医院排班数据
  getBookingScheduleRule(page, limit, hoscode, depcode) {
    return request({
      url: `${api_name}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
      method: "get"
    });
  },

  //根据医院编号 、科室编号和工作日期，查询排班信息
  findScheduleList(hoscode, depcode, workDate) {
    return request({
      url: `${api_name}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
      method: "get"
    });
  },
  //根据排班id获取排班数据
  getSchedule(id) {
    return request({
      url: `${api_name}/getSchedule/${id}`,
      method: "get"
    });
  }
};
